package com.uam.core.entity.model;

import java.util.List;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

public class TrackPositionDetail extends TaskTrackDetail {

	private int index = 0;

	private double elapsedDistance = 0.00D;

	private double elapsedCost = 0.00D;

	public TrackPositionDetail() {
		this(0, null, null, null, null, 0, 0, 0.00D, 0.00D, 0, null, 0.00D, 0.00D, 0.00D, 0.00D, 0L, 0.00D, null, 0,
				null, null, null, 0, 0.00D, 0.00D);
	}

	public TrackPositionDetail(TaskTrackDetail taskTrackDetail, int index, double elapsedDistance, double elapsedCost) {
		this(taskTrackDetail.getTaskId(), taskTrackDetail.getTaskName(), taskTrackDetail.getStartPoint(),
				taskTrackDetail.getEndPoint(), taskTrackDetail.getPassPoints(), taskTrackDetail.getStatus(),
				taskTrackDetail.getMode(), taskTrackDetail.getDistance(), taskTrackDetail.getCost(),
				taskTrackDetail.getAircraftId(), taskTrackDetail.getAircraftName(), taskTrackDetail.getMinAltitude(),
				taskTrackDetail.getMaxAltitude(), taskTrackDetail.getMaxSpeed(), taskTrackDetail.getMaxDuration(),
				taskTrackDetail.getStartTime(), taskTrackDetail.getAvgSpeed(), taskTrackDetail.getModelName(),
				taskTrackDetail.getAircraftId(), taskTrackDetail.getAircraftName(), taskTrackDetail.getTrack(),
				taskTrackDetail.getConflictTasks(), index, elapsedDistance, elapsedCost);
	}

	public TrackPositionDetail(int taskId, String taskName, JSONObject startPoint, JSONObject endPoint,
			JSONArray passPoints, int status, int mode, double distance, double cost, int aircraftId,
			String aircraftName, double minAltitude, double maxAltitude, double maxSpeed, double maxDuration,
			long startTime, double avgSpeed, String modelName, int authorId, String authorName, List<TrackPoint> track,
			List<TaskTrackDetail> conflictTasks, int index, double elapsedDistance, double elapsedCost) {
		super(taskId, taskName, startPoint, endPoint, passPoints, status, mode, distance, cost, aircraftId,
				aircraftName, minAltitude, maxAltitude, maxSpeed, maxDuration, startTime, avgSpeed, modelName, authorId,
				authorName, track, conflictTasks);
		this.index = index;
		this.elapsedDistance = elapsedDistance;
		this.elapsedCost = elapsedCost;
	}

	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}

	public double getElapsedDistance() {
		return elapsedDistance;
	}

	public void setElapsedDistance(double elapsedDistance) {
		this.elapsedDistance = elapsedDistance;
	}

	public double getElapsedCost() {
		return elapsedCost;
	}

	public void setElapsedCost(double elapsedCost) {
		this.elapsedCost = elapsedCost;
	}

}
